package my.mybatis.common.response;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import my.mybatis.common.response.base.Result;

import java.io.Serializable;
import java.util.List;

/**
 * @Author:wangbin.
 * @Description.
 * @Date:Created in 18:35 2017/9/18.
 * @Modified By:
 */
@ApiModel(value = "ListResult", description = "多数据格式结果集")
public class ListResult<T> extends Result implements Serializable{

    private static final long serialVersionUID = 1639788581263636736L;
    //列表数据结果集
    @ApiModelProperty(value = "列表数据结果集")
    private List<T> data;

    public List<T> getData() {
        return data;
    }

    public void setData(List<T> data) {
        this.data = data;
    }

    public static ListResult addData(List date)
    {
        ListResult result = new ListResult();
        result.setData(date);
        return result;
    }
}
